VERSION=0.1
CC=gcc

NAME=test

LIB=$(NAME).so.$(VERSION)
BIN=$(NAME)

SRC= vulneravel.c
LSRC=

INCLUDES=-I./
CFLAGS=-Wall -ggdb -O0 -m32

# flags do email do professor de software
CFLAGS+=-pg -fno-stack-protector -z execstack -static

LIBS=
LDFLAGS=#-shared -fPIC

OBJ = $(SRC:.c=.o)
LOBJ = $(LSRC:.c=.o)

bin:$(BIN)
	@echo bin done!

$(BIN): $(OBJ)
	$(CC) $(CFLAGS) $(INCLUDES) -o $(BIN) $(OBJ) $(LIBS)

lib: $(LIB)
	@echo lib done!

$(LIB): $(LOBJ)
	$(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) -o  $(LIB) $(LOBJ)  $(LIBS)

.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -c $< -o $@

clean:
	$(RM) *.o *~ $(LIB) $(BIN)

depend: $(SRC)
	makedepend $(INCLUDES) $^
